/*!The Treasure Box Library
 * 
 * TBox is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 * 
 * TBox is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with TBox; 
 * If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
 * 
 * Copyright (C) 2009 - 2015, ruki All rights reserved.
 *
 * @author		ruki
 * @file		time.h
 * @ingroup 	libc
 *
 */
#ifndef TB_LIBC_MISC_TIME_H
#define TB_LIBC_MISC_TIME_H

/* //////////////////////////////////////////////////////////////////////////////////////
 * includes
 */
#include "prefix.h"

/* //////////////////////////////////////////////////////////////////////////////////////
 * interfaces
 */

/*! the time as the number of seconds since the epoch, 1970-01-01 00:00:00 +0000 (utc)
 *
 * @return 				the returned time or -1
 */
tb_time_t 				tb_time(tb_noarg_t);

/*! the gmt time
 *
 * @param 				the time value
 * @param 				the gmt time pointer
 *
 * @return 				tb_true or tb_false
 */
tb_bool_t 				tb_gmtime(tb_time_t time, tb_tm_t* tm);

/*! the local time
 *
 * @param 				the time value
 * @param 				the local time pointer
 *
 * @return 				tb_true or tb_false
 */
tb_bool_t 				tb_localtime(tb_time_t time, tb_tm_t* tm);

/*! make the time value from the local time
 *
 * @param 				the time
 *
 * @return 				the time value
 */
tb_time_t 				tb_mktime(tb_tm_t const* tm);

/*! make the time value from the gmt time
 *
 * @param 				the time
 *
 * @return 				the time value
 */
tb_time_t 				tb_gmmktime(tb_tm_t const* tm);

#endif
